<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>管理登入</title>

  </head>
  <script type="text/javascript" language="javascript" >
  	function $(_id)
  	{
  		return document.getElementById(_id);
  	}
  	function login()
  	{
  		var nickname = $('nickname').value;
  		var pwd = $('pwd').value;
  		if(nickname == '' || pwd == '')
  		{
  			alert('昵称与密码为必填项');
  			return false;
  		}else{
  			$('form1').submit();
  		}
  		
  	}

  </script> 
  <body>
  <bean:cookie name="EasyCMS" value="" id="truename" />
  <logic:empty name="truename" property="value">	
  <form action="/manage/login.do" method="post" id="form1">
    <table align="center">
    	<tr>
    		<td>
    			用户名:
    		</td>
    		<td>
    			<input type="text" name="nickname" id="nickname" />
    		</td>
    	</tr>
    	<tr>
    		<td>
    			密码:
    		</td>
    		<td>
    			<input type="password" name="pwd" id="pwd" />
    		</td>
    	</tr>
    	<tr>
    		<td align="center" colspan="2">
    			<input type="checkbox" name="save" value="on" id="save" />两周不用登录&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="登入" onclick="javascript:login();" />
    		</td>
    	</tr>
    </table>
    </form>
    </logic:empty>
    <logic:notEmpty name="truename" property="value">
    	<h2 align="center">要更换用户请先注销</h2>
    </logic:notEmpty>
  </body>
</html:html>
